﻿#include "save_image.h"
#include "ui_save_image.h"

Save_image::Save_image(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::Save_image)
{
    ui->setupUi(this);
    ui->buttonBox->button(QDialogButtonBox::Ok)->setText("确定");
    ui->buttonBox->button(QDialogButtonBox::Cancel)->setText("取消");
}

Save_image::~Save_image()
{
    delete ui;
}

void Save_image::on_pushButton_2_clicked()
{
     this->close();
}

void Save_image::on_buttonBox_clicked(QAbstractButton *button)
{
    if(button == static_cast<QAbstractButton *>(ui->buttonBox->button(QDialogButtonBox::Ok)))
        {
            this->close();
        }
        else if(button == ui->buttonBox->button(QDialogButtonBox::Cancel))
        {
            this->close();
        }
}
